<?php

class Common_Form_Decorator_Div extends Zend_Form_Decorator_Abstract
{
    public function render($content)
    {
        $element  = $this->getElement();
        if (null  === ($view = $element->getView())) {
            return $content;
        }
        $name = $element->getName();
        $label = $element->getLabel();
        $required = ($element->isRequired())?('<span class="required"></span>'):('');
        $html = '<div class="form_row">
                        <div class="inline form_label">
                            <label for="' . $name . '">
                                ' . $label . '
                            </label>
                            ' . $required . '
                        </div>
                        <div class="inline form_element">
                            ' . $content . '
                        </div>
                    </div>';
        return $html;
    }
}
?>